//============================================================================
// Name        : testdsd.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <taglib/fileref.h>
#include <taglib/tiostream.h>
#include <taglib/tstring.h>
#include <taglib/tbytevector.h>
#include <taglib/tbytevectorstream.h>
#include <taglib/id3v1tag.h>
#include <taglib/id3v2tag.h>

using namespace std;
using namespace TagLib;

int main0(int argc, char **argv)
{
    bool read_audio_props = true;
    AudioProperties::ReadStyle read_style = AudioProperties::Fast;
    FileRef f(FileName(argv[1]),
                read_audio_props,
                read_style);

	Tag* tag = f.tag();

	String artist = tag->artist();
	String album = tag->album();
	String title = tag->title();
	String genre = tag->genre();
	String comment = tag->comment();

	uint year = tag->year();
	uint track = tag->track();

	int bitrate = f.audioProperties()->bitrate() * 1000;
	int length = f.audioProperties()->length() * 1000;

    return 0;
}
